<h1>Cart</h1>
<? if (!count($this->valuationsList)): ?>
  <p class="text-error">Your cart is empty</p>
<? endif; ?>
<style>
.table_custom tr th{
text-align: center;
}
.table_custom tr td{
text-align: center;
}
</style>
<table class="table table-striped table-condensed table-hover table_custom">
<tr>
    <th>Bin</th>
    <th>Exp</th>
    <th>Name</th>
    <th>Country</th>
    <th>City</th>
    <th>Zip</th>
    <th>Type</th>
    <th>Mark</th>
	<th>Bank</th>
	<th>Price</th>
</tr>
<? foreach ($this->valuationsList as $valuation): ?>
  <?= $this->partial('browse/simple-partial.phtml', array('valuation' => $valuation, 'skipButtons' => true, 'hideVoucher' => true) ); ?>
<? endforeach ?>
</table>
<? if (count($this->valuationsList)): ?>
  <? $cost = number_format(CFD_Cart::getCartObj()->calculateCost(), 2) ?>
  <?
  /*
    <p class="text-error">Total cost: <strong>&pound;<?= $cost ?></strong></p>
    <a href="/cart/card-details" class="btn btn-success">Pay now</a>
  */
  ?>

    <form method="POST" style="display:inline" action="/cart/use-bulk-credits">
    <input type="submit" href="/cart/card-details" class="btn btn-success" 
	<? if (count($this->valuationsList) > $this->bulkCredit): ?>
	  disabled="disabled"
	<? endif; ?>
	value="Pay with $ <?= number_format(CFD_Cart::getCartObj()->calculateCost(), 2)?> out of $ <?= number_format($this->bulkCredit, 2) ?>">
	</form>
	<br><br>
	<a href="/cart/bulk-credit">Buy Bulk Credit</a>
<? endif; ?>
